﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using FXnaAppBase;

namespace ASApplication
{
    public class AermodRC:RunCommand
    {

        public AermodRC(string exeName, string exeArgs, string workPath)
            : base(exeName, exeArgs, workPath)

        {
 
        }



        public override void BeforeRun()
        {
            base.BeforeRun();


            //查看工作目录中，是否存在对应的exe文件

            string destPath = this.WorkPath + "aermod.exe";


            if (!System.IO.File.Exists(destPath))
            {

                //取得程序中的文件
                string m2005Path = ProjectService.CurrentService.GetAppPath(AppPath.EXES) + @"aermod.exe";

                if (System.IO.File.Exists(m2005Path))
                {
                    System.IO.File.Copy(m2005Path, destPath);

                }
                else
                {
                    System.Windows.MessageBox.Show("未找到可运行的文件 aermod.exe");
                }



            }

        }




    }
}
